﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="edit.aspx.cs" Inherits="news_ImageManage_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    </head>
<body>
    <form id="form1" runat="server">
    <div class="button_bar">
        <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="common_button" 
            onclick="btnSave_Click"/>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="添加新图片" />
    </div>
    <div>
        <table class="query_form_table">
            <tr>
                <th>
                    编号
                </th>
                <td>
                    <asp:TextBox ID="txtId" runat="server" />
                </td>
                <th>
                    标题
                </th>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server"  />
                </td>
            </tr>
            <tr>
             <th>
                    缩略图宽度
                </th>
                <td>
                    <asp:TextBox ID="txtWidth" runat="server" Text="160"/>像素
                </td>
                <th>
                    缩略图高度
                </th>
                <td>
                    <asp:TextBox ID="txtHeight" runat="server" Text="120" />像素
                </td>
            </tr>
        </table>
        <table class="data_list_table">
            <tr>
                <th>
                    图片
                </th>
                <th>
                    链接
                </th>
                <th>
                    标题
                </th>
                <th>
                    操作
                </th>
            </tr>
            <asp:Repeater ID="rep1" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <img src='<%# Eval("ImageUrl") %>' />
                        </td>
                        <td>
                            <a href='<%# Eval("Url") %>' target="_blank"> <%# Eval("Url") %></a>
                        </td>
                        <td>
                            <%# Eval("title") %>
                        </td>
                        <td><a href='edit.aspx?cid=<%# Eval("id")%>&id=<%# Eval("fid") %>'>
                            <img src="../../images/bt_edit.gif" alt="修改" title="修改" /></a>
                            <a href='delete.aspx?flag=list&id=<%#Eval("id") %>' onclick="return confirm('确定删除？');">
                                <img src="../../images/bt_del.gif" alt="删除" />
                            </a>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
    <div id="divUpload" runat="server">
        链接:<asp:TextBox ID="txtUrl" runat="server" Width="327px" Text="http://" /><br />
        标题：<asp:TextBox ID="txtTitle1" runat="server" Width="327px" /><br />
        上传图片：
        <asp:FileUpload ID="FileUpload1" runat="server" />
        <asp:Button ID="btnUpload" runat="server" Text="上传" onclick="btnUpload_Click" />
    </div>
    </form>
</body>
</html>
